package com.white.bean;

import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * -- ⑩　交流：交流ID、发送用户ID、响应用户ID、内容、创建时间。
 * create table communicate(
 * communicateId int primary key AUTO_INCREMENT comment "交流ID",
 * requestUserId int comment "发送用户ID",
 * foreign key(requestUserId) REFERENCES user(userId) on delete cascade on update cascade,
 * responseUserId int comment "响应用户ID",
 * foreign key(responseUserId) REFERENCES user(userId) on delete cascade on update cascade,
 * content varchar(256) comment "内容",
 * createTime TIMESTAMP not null default CURRENT_TIMESTAMP comment "创建时间，默认当前时间戳"
 * );
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Communicate{
    @TableId("communicateId")
    private Long communicateId;
    private Long requestUserId, responseUserId;
    private String content, createTime;

    public Communicate(Long requestUserId, Long responseUserId, String content) {
        this.requestUserId = requestUserId;
        this.responseUserId = responseUserId;
        this.content = content;
    }
}
